// ie polyfill
import '@babel/polyfill'
//引入公共组件与表单组件的css
import '@lowcode/jpaas-common-lib/lib/jpaas-common-lib.css'

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store/'
import rxAjax from '@/assets/js/ajax.js';

import '@/assets/js/directive.js'


/**
 * 引入图表
 */
import * as Echarts from 'echarts'
Vue.prototype.$echarts = Echarts

import moment from "moment";
Vue.prototype.moment = moment;

/**
 * 挂载广播到全局
 * */
Vue.prototype.$broadCast = new BroadcastChannel("refreshFormDesign")

import bootstrap from './core/bootstrap'
import './core/lazy_use'
import './permission' // permission control
import './utils/filter' // global filter
import 'ant-design-vue/dist/antd.less'
import layer from 'rx-vue-layer'
import 'rx-vue-layer/lib/vue-layer.css';

Vue.use(window.VueCodemirror);
import JSONView from 'vue-json-viewer'
Vue.use(JSONView)

import '@/assets/js/share';

Vue.prototype.$layer = layer(Vue);
Vue.prototype.rxAjax = rxAjax;

Vue.config.productionTip = false

//open vue devtools
Vue.config.devtools = true

/*右键菜单*/
import contentmenu from 'v-contextmenu'
import 'v-contextmenu/dist/index.css'
Vue.use(contentmenu)

/*引入自定义弹窗*/
import {MessageBox,VueBus} from '@lowcode/jpaas-common-lib';
Vue.prototype.$MessageBox = MessageBox ;
Vue.use(VueBus);

/*引入拖拽表单设计器*/
Vue.prototype.$baseUrl = process.env.VUE_APP_ADMIN_FRONT;


// 引入jpaas图标库
import "@public/icons.js";

//引入common-lib 里的组件
import commonControl from '@lowcode/jpaas-common-lib'
Vue.use(commonControl)


// 全局事件总线，创建一个vue实例，挂载到根实例
window.eventBus = new Vue();


// 增加md5 加密函数。
import md5 from "js-md5";
Vue.prototype.$md5=md5;

import rxFullcalendar from 'rx-fullcalendar'
Vue.use(rxFullcalendar)

//国际化语言解析
import {I18Parse} from '@lowcode/jpaas-common-lib';
Vue.use(I18Parse);
import i18Sharse from "@/locales/i18Sharse";
Vue.use(i18Sharse);

import i18n from './locales'

//引入扩展组件注册。
import "./views/extend/index"

//引入ECHARTS
import * as echarts from 'echarts';
Vue.prototype.$echarts = echarts;

new Vue({
  router,
  store,
  i18n,
  created: bootstrap,
  render: h => h(App)
}).$mount('#app')
